package com.hwua.tqm;

public class UserViewDemo2 extends FatherTable {

	@Override
	public String[] columnNamesInit() {
		String[] columnNames = { "姓名", "学号", "性别","年龄" };
		return columnNames;
	}

	@Override
	public Object[][] tableDataInit() {
		Object[][] rowData = { 
				new Object[] { "李清照", 29, "女",30 }, 
				new Object[] { "苏格拉底", 56, "男",30 },
				new Object[] { "小龙女", 35, "男" ,30},
				new Object[] { "张三丰", 18, "女" ,30},
				new Object[] { "隔壁老王", 2, "男" ,20} };
		return rowData;
	}

	@Override
	public void deleteMoreAction(Object[] ids) {
		String idsStr="{";
		for (Object object : ids) {
			idsStr+=object;
		}
		idsStr+="}";
		System.out.println("删除id=" + idsStr+"的信息");
		
	}

	@Override
	public void addSaveAction(Object[] obj) {
		String idsStr="{";
		for (Object object : obj) {
			idsStr+=object;
		}
		idsStr+="}";
		System.out.println("添加信息：" + idsStr);
		
	}

	@Override
	public void updateSaveAction(Object[] obj) {
		String idsStr="{";
		for (Object object : obj) {
			idsStr+=object;
		}
		idsStr+="}";
		System.out.println("修改信息：" + idsStr);
		
	}

	@Override
	public Object[][] searchAction(String keyword) {
		System.out.println("搜索内容为：{"+keyword+"}");
		Object[][] rowData = { 
				new Object[] { "小龙女", 35, "男" ,30},
				new Object[] { "张三丰", 18, "女" ,30},
				new Object[] { "隔壁老王", 2, "男" ,20} };
		return rowData;
	}

	@Override
	public void deleteAction(Object id) {
		System.out.println("删除id为：{"+id+"}的信息");
		
	}

}
